﻿@model Financial.WebApi.ViewModels.IncomeVm
@{
    ViewBag.Title = "Add/Edit Income";
}
<link href="~/Content/themes/base/jquery-ui.css" rel="stylesheet" />
<br />
<h4>Add/Edit Income</h4>
    @using (Html.BeginForm())
    {
        @Html.AntiForgeryToken()

        <div class="form-horizontal">
            @Html.ValidationSummary(true, "", new { @class = "text-danger" })

            <div class="form-group">
                @Html.LabelFor(model => model.FamilyMemberId, htmlAttributes: new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.DropDownList("FamilyMemberId", null, htmlAttributes: new { @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.FamilyMemberId, "", new { @class = "text-danger" })
                </div>
            </div>
            <div class="form-group">
                @Html.LabelFor(model => model.Date, htmlAttributes: new { @class = "control-label col-md-2" })<br />
                <div class="col-md-10">
                    @Html.TextBoxFor(model => model.Date, new { id = "datepicker", @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.Date, "", new { @class = "text-danger" })
                </div>
            </div>
            <div class="form-group">
                @Html.LabelFor(model => model.Wage, htmlAttributes: new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.Wage, new { htmlAttributes = new { @class = "form-control" } })
                    @Html.ValidationMessageFor(model => model.Wage, "", new { @class = "text-danger" })
                </div>
            </div>
            <div class="form-group">
                @Html.LabelFor(model => model.MealTicket, htmlAttributes: new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.MealTicket, new { htmlAttributes = new { @class = "form-control" } })
                    @Html.ValidationMessageFor(model => model.MealTicket, "", new { @class = "text-danger" })
                </div>
            </div>
            <div class="form-group">
                @Html.LabelFor(model => model.Bonus, htmlAttributes: new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.Bonus, new { htmlAttributes = new { @class = "form-control" } })
                    @Html.ValidationMessageFor(model => model.Bonus, "", new { @class = "text-danger" })
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-offset-2 col-md-10">
                    <input type="submit" value="Ok" class="btn btn-primary" />
                    @Html.ActionLink("Cancel", "Index", "Income", new { @class = "btn btn-primary" })
                </div>
            </div>
        </div>
    }
@section Scripts{
    <script src="~/Scripts/jquery-1.10.2.js"></script>
    <script src="~/Scripts/jquery-ui-1.10.0.js"></script>
    <script src="~/Scripts/CustomScripts/IncomeDetail.js"></script>
    <script src="~/Scripts/CustomScripts/Testing.js"></script>
}
